function *genetator() {
  yield 'Hello Node'
  yield 'Hello Javast'
  return 'end'
}
var gen = genetator()
console.log(gen) // Object [Generator] {}
console.log(gen.next()) //{ value: 'Hello Node', done: false }
console.log(gen.next()) // { value: 'Hello Javast', done: false }
console.log(gen.next()) // { value: 'end', done: true }
console.log(gen.next()) // { value: undefined, done: true }